<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <style>
        html, body {
            background-color: #f8f8f8;
        }
        #footer {
            width:100%;
            background-color: #fff;
            height: 60px;
            position: fixed;
            bottom: 0;
            text-align: center;
        }
        #footer .btn {
            width:80%;
            background-color: #c7c7c7;
            color:#fff;
            text-align: center;
            margin:0 auto;
            margin-top: 8px;
            height: 45px;
            line-height: 45px;
            border-radius: 5px;
        }
        #footer .btn:first-child {
            margin-right: 10px;
        }
        #footer .btn.active {
            background-color: #e62442;
        }
        .unconfirm {
            display: none;
        }
    </style>
</head>
<body>
	<footer id="footer">
        <div class="unconfirm">
            <button class="btn active" onclick="fnCheckStaff();" tapmode>扫码确认</button>
        </div>
    </footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.js"></script>
<script type="text/javascript">
    apiready = function(){
        // $api.fixStatusBar(header);
        id = api.pageParam.id;
        status = api.pageParam.status;
        var bottomH = 0;
        if(status == 3) {
            bottomH = 60; 
            $('.unconfirm').show();
        }
        api.openFrame({
            name: 'order_detail2_frame',
            url: 'order_detail2_frame.html',
            rect: {
                x: 0,
                y: 0,
                w: 'auto',
                h: api.winHeight - bottomH
            },
            bounces: true,
            pageParam : {
                id:id,
                status : status
            }
        });

        api.addEventListener({
            name: 'closeDetailEvent'
        }, function(ret, err) {
            if (ret) {
                api.closeWin();
            }
        });
    };

    function fnCheckStaff() {
        api.openWin({
            name: 'scan',
            url: './scan.html',
        });
    }
</script>
</html>